﻿using LtMbs;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting.Web;
using System.Net;
using System;

namespace HelpdeskPluginTestLibary
{
    
    
    /// <summary>
    ///This is a test class for CommonTest and is intended
    ///to contain all CommonTest Unit Tests
    ///</summary>
    [TestClass()]
    public class CommonTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for wipQueue
        ///</summary>
        [TestMethod()]
        [HostType("ASP.NET")]
        [AspNetDevelopmentServerHost("C:\\Users\\Rihan\\Documents\\Visual Studio 2008\\Projects\\Kalahari\\WrapperSearchService", "/WrapperSearchService")]
        [UrlToTest("http://localhost/WrapperSearchService")]
        public void wipQueueTest()
        {
            //queue expected = null; // TODO: Initialize to an appropriate value
            //queue actual;
            //actual = Common_Accessor.wipQueue();
            //Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for updateConfigFile
        ///</summary>
        [TestMethod()]
        [HostType("ASP.NET")]
        [AspNetDevelopmentServerHost("C:\\Users\\Rihan\\Documents\\Visual Studio 2008\\Projects\\Kalahari\\WrapperSearchService", "/WrapperSearchService")]
        [UrlToTest("http://localhost/WrapperSearchService")]
        public void updateConfigFileTest()
        {
            string dateTime = DateTime.Now.ToLongDateString();
            Common_Accessor.updateConfigFile(dateTime);
            Assert.IsNotNull(dateTime);
        }

        /// <summary>
        ///A test for removeHTMLTags
        ///</summary>
        [TestMethod()]
        [HostType("ASP.NET")]
        [AspNetDevelopmentServerHost("C:\\Users\\Rihan\\Documents\\Visual Studio 2008\\Projects\\Kalahari\\WrapperSearchService", "/WrapperSearchService")]
        [UrlToTest("http://localhost/WrapperSearchService")]
        public void removeHTMLTagsTest()
        {
            string input = "<a href='some test url'>TestData";
            string expected = "TestData";
            string actual;
            actual = Common_Accessor.removeHTMLTags(input);
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for LogErrorMessage
        ///</summary>
        [TestMethod()]
        [HostType("ASP.NET")]
        [AspNetDevelopmentServerHost("C:\\Users\\Rihan\\Documents\\Visual Studio 2008\\Projects\\Kalahari\\WrapperSearchService", "/WrapperSearchService")]
        [UrlToTest("http://localhost/WrapperSearchService")]
        public void LogErrorMessageTest()
        {
            Exception errorHandler = new Exception("Test Exception");
            Common_Accessor.LogErrorMessage(errorHandler);
        }

        /// <summary>
        ///A test for KmsAuthorize
        ///</summary>
        [TestMethod()]
        [HostType("ASP.NET")]
        [AspNetDevelopmentServerHost("C:\\Users\\Rihan\\Documents\\Visual Studio 2008\\Projects\\Kalahari\\WrapperSearchService", "/WrapperSearchService")]
        [UrlToTest("http://localhost/WrapperSearchService")]
        public void KmsAuthorizeTest()
        {
           // KalDev.CRMServiceSoapClient connect = Common_Accessor.KmsAuthorize();
           // Assert.IsNotNull(connect.ClientCredentials);
            //CRMService actual;
            //actual = Common_Accessor.KmsAuthorize();
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for CrmAutorize
        ///</summary>
        [TestMethod()]
        [HostType("ASP.NET")]
        [AspNetDevelopmentServerHost("C:\\Users\\Rihan\\Documents\\Visual Studio 2008\\Projects\\Kalahari\\WrapperSearchService", "/WrapperSearchService")]
        [UrlToTest("http://localhost/WrapperSearchService")]
        public void CrmAutorizeTest()
        {
            //CrmService expected = null; // TODO: Initialize to an appropriate value
            //CrmService actual;
            //actual = Common_Accessor.CrmAutorize();
            //Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Credential
        ///</summary>
        [TestMethod()]
        [HostType("ASP.NET")]
        [AspNetDevelopmentServerHost("C:\\Users\\Rihan\\Documents\\Visual Studio 2008\\Projects\\Kalahari\\WrapperSearchService", "/WrapperSearchService")]
        [UrlToTest("http://localhost/WrapperSearchService")]
        public void CredentialTest()
        {
            NetworkCredential expected = null; // TODO: Initialize to an appropriate value
            NetworkCredential actual;
            actual = Common_Accessor.Credential();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for CreateAuthorizationHeader
        ///</summary>
        [TestMethod()]
        [HostType("ASP.NET")]
        [AspNetDevelopmentServerHost("C:\\Users\\Rihan\\Documents\\Visual Studio 2008\\Projects\\Kalahari\\WrapperSearchService", "/WrapperSearchService")]
        [UrlToTest("http://localhost/WrapperSearchService")]
        public void CreateAuthorizationHeaderTest()
        {
            //AuthHeader expected = null; // TODO: Initialize to an appropriate value
            //AuthHeader actual;
            //actual = Common_Accessor.CreateAuthorizationHeader();
            //Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for configurationFilePath
        ///</summary>
        [TestMethod()]
        [HostType("ASP.NET")]
        [AspNetDevelopmentServerHost("C:\\Users\\Rihan\\Documents\\Visual Studio 2008\\Projects\\Kalahari\\WrapperSearchService", "/WrapperSearchService")]
        [UrlToTest("http://localhost/WrapperSearchService")]
        public void configurationFilePathTest()
        {
            string expected = string.Empty; // TODO: Initialize to an appropriate value
            string actual;
            actual = Common_Accessor.configurationFilePath();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Common Constructor
        ///</summary>
        [TestMethod()]
        [HostType("ASP.NET")]
        [AspNetDevelopmentServerHost("C:\\Users\\Rihan\\Documents\\Visual Studio 2008\\Projects\\Kalahari\\WrapperSearchService", "/WrapperSearchService")]
        [UrlToTest("http://localhost/WrapperSearchService")]
        public void CommonConstructorTest()
        {
            Common_Accessor target = new Common_Accessor();
            Assert.Inconclusive("TODO: Implement code to verify target");
        }
    }
}
